using UnityEngine;
using System.Collections;

public class PlayerTraditionalRigidbodyMovementBehaviour : MonoBehaviour {

	
	public float movementSpeed;
	
	private Vector3 movementDirection;
	private Rigidbody rigBody;
	
	private float initialDrag;
	
	void Start () {
		
		
		
		rigBody = this.GetComponent<Rigidbody>();
		
		if(rigBody == null)
		{
			Debug.LogError("Whoops, didn't find a Rigid Body.");
		}
		
		this.initialDrag = this.rigBody.drag;
		
	}
	
	
	void Update () {
		movementDirection = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
		
	
		
		Debug.Log("Velocity: " + this.rigBody.velocity);
	
		this.rigBody.MovePosition( this.rigBody.position + movementDirection * movementSpeed * Time.deltaTime);
	}
	
	

}
